<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('金额流向列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list" style="display: none">
						<ul>


							<!--<li>-->
								<!--用户id：<input type="text" name="userId"/>-->
							<!--</li>-->
							<li style="display: none">
								用户id：<input type="text" name="userId" th:value=${userId} />
							</li>



							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
	        <div class="btn-group-sm" id="toolbar" role="group">

				<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="Money:money:remove">
					<i class="fa fa-remove"></i> 删除
				</a>
				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="Money:money:export">
						<i class="fa fa-download"></i> 导出
				 </a>
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('Money:money:edit')}]];
        var removeFlag = [[${@permission.hasPermi('Money:money:remove')}]];
        var prefix = ctx + "Money/money";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
				exportUrl: prefix + "/export",
                modalName: "金额流向",
		        showExport: true,
                columns: [{
		            checkbox: true
		        },
				{
					field : 'id', 
					title : 'id',
					visible: false
				},
				{
					field : 'orderId', 
					title : '订单id',
					sortable: false
				},
				// {
				// 	field : 'userId',
				// 	title : '用户id',
				// 	sortable: true
				// },

					{
						title: '金额',
						formatter: function(value, row, index) {
							if(row.jine>0){
								return '+' + row.jine ;
							}  else {
								return row.jine;
							}
						},
					},

					{
						title: '支付方式',
						formatter: function(value, row, index) {
							if(row.payWay==5001){
								return '微信支付';
							} else if(row.payWay==5002) {
								return '余额支付';
							} else if(row.payWay==5003) {
								return '金币支付';
							} else if(row.payWay==5004) {
								return '骑手佣金';
							} else if(row.payWay==5005) {
								return '升级金币';
							} else if(row.payWay==5006) {
								return '帮圈佣金';
							} else if(row.payWay==5007) {
								return '签到金币';
							}else {
								return '不详';
							}
						},
					},
				{
					field : 'hbUserId', 
					title : '红包id',
					sortable: false
				},
				{
					field : 'jilu', 
					title : '记录',
					sortable: false
				},
					{
						field : 'nowMoney',
						title : '余额',
						sortable: false
					},

				{
					field : 'creactDate', 
					title : '创建时间',
					sortable: false
				}

		        ]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>